import { http } from "../../utils/http";
//订单新增--获取最大订单号
export const getMaxpurchaseOrderId = () => {
  return http.request("get", "/box/getMaxPurchaseOrderId");
};

//订单新增--获取当前库存量
export const getStockReport = () => {
  return http.request("get", "/box/getStockReport");
};


// 订单新增--获取订单列表
export const getPurchaseOrderIdList = () => {
  return http.request("get", "/box/getPurchaseOrderIdList");
};


//订单新增--新增采购订单
export const insertPurchaseOrder = (insertData) => {
  console.log("收到的参数");
  console.log(insertData);
  return http.request("post", "/box/insertPurchaseOrder",{ data: insertData });
};
//订单新增--打印PDF
export const purchaseOrderPrintPDF = (printData) => {
  return http.request("post", "/box/purchaseOrderPrintPDF",{ data: printData });
};
//订单完成情况跟踪--获取所有订单信息 //订单完成情况跟踪--按单号查询订单信息
export const getPurchaseOrder = (printData) => {
  return http.request("post", "/box/getPurchaseOrder" , { data: printData });
};


//订单完成情况跟踪--按单号查询订单信息
// export const searchPurchaseOrder = (poid) => {
//   return http.request("post", "/box/searchPurchaseOrder",{ data: poid});
// };

//订单新增--按单号删除订单信息
export const deletePurchaseOrder = (poid) => {
  return http.request("delete", "/box/deletePurchaseOrder",{ data: poid});
};

//订单新增--按单号删除订单信息
export const updatePurchaseOrder = (rowData) => {
  return http.request("get", "/box/updatePurchaseOrder",{ data: rowData});
};
